<template>
  <div class="table-box">
    <el-table :data="tableData" height="250" border style="width: 100%">
      <el-table-column
        :prop="item.prop"
        v-for="item in tableHead"
        :key="item.label"
        :label="item.label"
      />
    </el-table>
  </div>
</template>

<script>
export default {
  name: "table2",
  props: {
    // 表格里的数据
    tableData: {
      type: Array,
      default: () => []
    },
    // 表格的表头数据
    tableHead: {
      type: Array,
      default: () => []
    }
  }
};
</script>

<style></style>
